#include "LabeledStmt.h"
#include "../Expressions/ConstantExpr.h"
#include "Statement.h"
#include "../../symtab/symtab.h"

LabeledStmt::~LabeledStmt(void)
{
	switch(m_iType)
	{
	case identifier_stmt:
		delete m_pIdentifierStmt;
		break;
	case default_stmt:
		delete m_pDefaultStmt;
		break;
	case case_stmt:
		delete m_pCaseStmt;
		delete m_pCaseExpr;
		break;
	default:
		assert(0);
	}
}

void LabeledStmt::codeGen()
{
	COUT
	switch(m_iType)
	{
		case identifier_stmt:
			m_pIdentifierStmt->codeGen();
			break;
		case default_stmt:
			m_pDefaultStmt->codeGen();
			break;
		case case_stmt:
			m_pCaseStmt->codeGen();
			m_pCaseExpr->codeGen();
			break;
		default:
			assert(0);
	}
}